#include "Wheel.hpp"

#include "Hardware.hpp"

void Wheel::forward()
{
	Hardware::getHardwareController().activateWheels();
	if (type == Wheel::LEFT)
		Hardware::getHardwareController().leftWheelForward();
	else
		Hardware::getHardwareController().rightWheelForward();
}

void Wheel::backward()
{
	Hardware::getHardwareController().activateWheels();
	if (type == Wheel::LEFT)
		Hardware::getHardwareController().leftWheelBackward();
	else
		Hardware::getHardwareController().rightWheelBackward();
}

void Wheel::stop()
{
	Hardware::getHardwareController().disableWheels();
}

Wheel::Wheel(WheelType aType) :
		type(aType)
{ }
